package com.example.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.web.server.impl.SendTemplate;



@RestController
public class EmailController {

	@Autowired
	SendTemplate sendTemplate;
	
	@GetMapping("/send")
	public boolean send(String subject,String to) {
		return sendTemplate.sendResetHtml(subject, to);
	}
	
	@GetMapping("/send2")
	public boolean send2(String subject,String to) {
		return sendTemplate.sendResetText(subject, to);
	}
	
	@GetMapping("/send3")
	public boolean send3(String subject,String to) {
		return sendTemplate.sendResetFiles(subject, to);
	}
	@GetMapping("/send4")
	public boolean send4(String subject,String to) {
		return sendTemplate.sendMailImg("825620905@qq.com", "aa",true);
	}
}
